<?php

namespace App\Models;

use Illuminate\Database\Eloquent\Model;

class BannerType extends Model
{
    /**
     * 格式化时间
     * */
    protected function serializeDate(\DateTimeInterface $date)
    {
        return $date->format('Y-m-d H:i:s');
    }

    /**
     * 获取广告位下广告
     */
    public function banners()
    {
        return $this->hasMany('App\Models\banner','ad_id');
    }

}
